<?php
define('Copyright', 'QQ:11497576');
define('ROOT_PATH', $_SERVER["DOCUMENT_ROOT"].'/');
include_once ROOT_PATH.'/sjvip/cookie.php';
global $user;
$kithe=newKithe();
if(conKithe('lq',$kithe)==0){
$biaod="cn_zhudan";
}else{
$biaod="cn_zhudan1";
} 
$js="";
$js.="ok@".$user[0]['kauser']."@".$user[0]['cs']."@".($user[0]['cs']-$user[0]['ts'])."@".$user[0]['ts']."@";


 $db=new DB();
	  $result = $db->query("SELECT distinct(numberid) FROM {$biaod} WHERE  kithe='{$Current_Kithe_Num}' and username='{$user[0]['kauser']}'  and zx<'1' ORDER BY id DESC   limit 10",1);
	 //dump($result);
	 if($result){
	 $js.="3";
	 }
      for ($i=0; $i<count($result); $i++)
	  {
	   $zhudan = $db->query("SELECT sum(sum_m) as sum_m,class2 ,adddate ,class5,class3 FROM {$biaod} WHERE  numberid='{$result[$i]['numberid']}'",1);
if($zhudan[0]['lx']>=1){
	   $rest = substr($zhudan[0]['class5'], 0, 5);
	   }else{
	   $rest = substr($zhudan[0]['class3'], 0, 5);
	   }
	     if($zhudan[0]['lx']>=1){
	    if (strlen($zhudan[0]['class5']) >4) {$rest.="(?";}
	  }else{
	   if (strlen($zhudan[0]['class3']) >4) {$rest.="(?";}
	   }

	   
$js.="| ".substr($zhudan[0]['adddate'],10,6)."|".$zhudan[0]['class2'].$rest."`".$zhudan[0]['class2'].$rest."|".$zhudan[0]['sum_m']."##";

}
echo $js;
?>
